package com.foton.lotteryinterfaces.interfaces.assembler;

import com.foton.lotterydomain.strategy.model.vo.DrawAwardInfo;
import com.foton.lotteryrpc.rpc.dto.AwardDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;

/**
 * @Author RenPu
 * @Date 2024/1/5 17:31
 * @Version 1.0
 * @Description:
 **/

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, unmappedSourcePolicy = ReportingPolicy.IGNORE)
public interface AwardMapping extends IMapping<DrawAwardInfo, AwardDTO> {

    @Mapping(source = "uId",target = "userId")  //字段名称映射
    @Override
    AwardDTO sourceToTarget(DrawAwardInfo drawAwardInfo);

    @Override
    DrawAwardInfo targetToSource(AwardDTO awardDTO);
}
